from sqlalchemy import Column, String, JSON, ForeignKey
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import relationship, declarative_base
from database import Base  # 从 main.py 导入共享的 Base

class Resume(Base):
    __tablename__ = 'resumes'

    resume_id = Column(String(36) ,primary_key=True)  # 简历唯一ID (UUID)
    user_id = Column(String(36), nullable=False)  # user_id 去除外键定义
    parsed_data = Column(JSON, nullable=False)  # 存储解析后的结构化数据（JSONB）
    fileids = Column(String(200), nullable=False)  # 上传的文件名
